<!--  -->
<template>
   <div class="goods container">
      <div><List :list="foodsList"></List></div>
    <!-- 分页区 -->
    <el-pagination
      @size-change="sizeChangeHandle"
      @current-change="currentChangeHandle"
      :current-page="pageIndex"
      :page-sizes="[5, 10,15, 50]"
      :page-size="pageSize"
      :total="totalPage"
      layout="total, sizes, prev, pager, next, jumper">
    </el-pagination>
  </div>
</template>

<script>
import List from "../components/home/List"
export default {
  name:'Foods',
  data () {
    return {
      foodsList:[
      {id:"0001",name:"非卖品【试用装】皇家 小型犬成犬湿粮试用装 85g",price:1000, sales:200, weight:22.90, imgSrc:"https://img-new.boqiicdn.com/Data/Shop/3/370/37062/shoppicpath11595325735_y.jpg?imageView2/2/w/375/h/375/q/100/interlace/0/format/jpg"},
      {id:"0002",name:"法国皇家Royal Canin CC优选全犬种成犬粮 8kg",price:1000, weight:32.90, sales:200,imgSrc:"https://img-new.boqiicdn.com/Data/Shop/0/1/112/shoppicpath11567419396_y.jpg?imageView2/2/w/375/h/375/q/100/interlace/0/format/jpg"},
      {id:"0003",name:"法国皇家Royal Canin 小型成犬粮 2kg",price:2000, weight:52.90, sales:200,imgSrc:"https://img-new.boqiicdn.com/Data/Shop/0/1/186/shoppicpath11567952046_y.jpg?imageView2/2/w/375/h/375/q/100/interlace/0/format/jpg"},
      {id:"0004",name:"麦富迪 牛肉+蛋黄佰萃成犬粮 20kg 添加蛋黄颗粒 亮泽毛发",price:3000, weight:62.90, sales:200,imgSrc:"https://img-new.boqiicdn.com/Data/Shop/4/439/43971/shoppicpath11621413724_y.png?imageView2/2/w/375/h/375/q/100/interlace/0/format/png"}, 
      {id:"0005",name:"麦富迪 牛肉+蛋黄佰萃成犬粮 20kg 添加蛋黄颗粒 亮泽毛发",price:3000, weight:62.90, sales:200,imgSrc:"https://img-new.boqiicdn.com/Data/Shop/4/439/43971/shoppicpath11621413724_y.png?imageView2/2/w/375/h/375/q/100/interlace/0/format/png"}, 
      {id:"0006",name:"麦富迪 牛肉+蛋黄佰萃成犬粮 20kg 添加蛋黄颗粒 亮泽毛发",price:3000, weight:62.90, sales:200,imgSrc:"https://img-new.boqiicdn.com/Data/Shop/4/439/43971/shoppicpath11621413724_y.png?imageView2/2/w/375/h/375/q/100/interlace/0/format/png"}, 
      ],
        pageIndex: 1,
        pageSize: 10,
        totalPage: 0,
    };
  },
  components:{List},
  methods: {
    // 每页数
      sizeChangeHandle (val) {
        this.pageSize = val
        this.pageIndex = 1
        this.getDataList()
      },
      // 当前页
      currentChangeHandle (val) {
        this.pageIndex = val
        this.getDataList()
      },
  },
  
}

</script>
<style lang='less' scoped>
@import '../assets/css/total.less';

</style>